import { BaseUrl } from '@/setting'
import uniPromisify from '@/util/uniPromisify'

/**
 * 体测报告详情
 * @param {*} reportId
 */
export function getReportDetail(reportId) {
  return uniPromisify.request({
    method: 'POST',
    url: `${BaseUrl}/api/system/report/reportDetail`,
    cache: true,
    data: { reportId }
  })
}

/**
 * 专家团队列表
 */
export function getExpertlist() {
  return uniPromisify.request({
    method: 'POST',
    url: `${BaseUrl}/api/system/team/expertList`,
    data: {
      pageNum: 1,
      pageSize: 10000
    }
  })
}

/**
 * 报告帮助视频
 * @returns
 */
export function getHelpVideo() {
  return uniPromisify.request({
    method: 'POST',
    url: `${BaseUrl}/api/system/video/list`,
    data: {
      typeId: '3'
    }
  })
}

/**
 * 获取海报地址
 * @returns
 */
export function getPoster() {
  return uniPromisify.request({
    method: 'GET',
    url: `${BaseUrl}/api/common/getPoster`
  })
}

/**
 * 体测报告详情个人信息部分
 * @param {*} reportId
 * @returns
 */
export function getReportDetailStudent(reportId) {
  return uniPromisify.request({
    method: 'POST',
    url: `${BaseUrl}/api/my/system/report/reportDetailStudent`,
    data: { reportId }
  })
}

/**
 * 体测报告详情八项体测部分
 * @param {*} reportId
 * @returns
 */
export function getReportDetailPhysical(reportId) {
  return uniPromisify.request({
    method: 'POST',
    url: `${BaseUrl}/api/my/system/report/reportDetailPhysical`,
    data: { reportId }
  })
}

/**
 * 报告详情其他项详情
 * @param {*} reportId
 * @returns
 */
export function getReportDetailOther(reportId) {
  return uniPromisify.request({
    method: 'POST',
    url: `${BaseUrl}/api/my/system/report/reportDetailOther`,
    data: { reportId }
  })
}

/**
 * 报告详情生长监测图
 * @param {*} reportId
 * @returns
 */
export function getReportDetailMap(reportId) {
  return uniPromisify.request({
    method: 'POST',
    url: `${BaseUrl}/api/my/system/report/reportDetailMap`,
    data: { reportId }
  })
}
